
package it.bd.SetAllConnectionsOff;

import android.app.TabActivity;
import android.os.Bundle;
import android.widget.TabHost;

import it.bd.SetAllConnectionsOff.activity.AdvancedTabActivity;
import it.bd.SetAllConnectionsOff.activity.CurrentStateActivity;
import it.bd.SetAllConnectionsOff.activity.LimitedStateActivity;
import it.bd.SetAllConnectionsOff.helper.AServiceHelper;
import it.bd.SetAllConnectionsOff.helper.BluetoothHelper;
import it.bd.SetAllConnectionsOff.helper.GpsHelper;
import it.bd.SetAllConnectionsOff.helper.NetworkHelper;
import it.bd.SetAllConnectionsOff.helper.PowerHelper;
import it.bd.SetAllConnectionsOff.helper.StateHelper;
import it.bd.SetAllConnectionsOff.helper.WifiHelper;

import java.util.ArrayList;

public class SetAllConnectionsOff extends TabActivity {

    public static final String              PREF_NAME = "setWifiOffPref";
    public static ArrayList<AServiceHelper> helpers   = null;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        // -----------
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        initHelpers();
        TabHost tabHost = getTabHost();
        new CurrentStateActivity(tabHost, this);
        new LimitedStateActivity(tabHost, this);
        new AdvancedTabActivity(tabHost, this);
        // tabHost.setCurrentTabByTag(ls.getTabTag());
    }

    private void initHelpers() {
        helpers = new ArrayList<AServiceHelper>();
        helpers.add(new NetworkHelper(this));
        helpers.add(new GpsHelper(this));
        helpers.add(new BluetoothHelper(this));
        helpers.add(new WifiHelper(this));
        // helpers.add(
        new PowerHelper(this, getContentResolver(), getWindow())
        // )
        ;
        new StateHelper(this);
    }
}
